﻿@model ElCharro01.Models.Product
@{
    ViewBag.Title = "Edit";
    Layout = "~/Views/Shared/_LayoutAdmin.cshtml";
}
<div class="paddalo">
    <h2 class="centered">
        Gestione Prodotti->Edit</h2>
    <script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
    @using (Html.BeginForm())
    {
        @Html.ValidationSummary(true)
        <fieldset>
            <legend>Product</legend>
            @Html.HiddenFor(model => model.ID)
            <div class="editor-label">
                @Html.LabelFor(model => model.Nome)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.Nome)
                @Html.ValidationMessageFor(model => model.Nome)
            </div>
            <div class="editor-label">
                @Html.LabelFor(model => model.Descrizione)
            </div>
            <div class="editor-field">
                @Html.TextAreaFor(model => model.Descrizione, 13, 40, null)
                @Html.ValidationMessageFor(model => model.Descrizione)
            </div>
            <div class="editor-label">
                Includi Nello Slideshow
            </div>
            <div class="editor-field">
                @Html.CheckBoxFor(model => model.InSlideShow)
            </div>
            <div class="editor-field">
                @Html.Label("Categoria Appartenenza")
            </div>
            <div class="editor-field">
                @Html.DropDownList("CategoryId", new SelectList(ViewBag.CategoryList, "Id", "Nome", ViewBag.CurrentCategoryId))
            </div>
            <div class="editor-field">
                @Html.Label("Tipo Abbigliamento")
            </div>
            <div class="editor-field">
                @Html.DropDownList("ClothingTypeId", new SelectList(ViewBag.CloghintTypeList, "ID", "Nome", ViewBag.CurrentCloghintTypeId))
            </div>
            <p>
                <input type="submit" value="Save" />
            </p>
        </fieldset>
    }
    <div class="centralo">
        @Html.ActionLink("Torna Indietro", "Index")
    </div>
</div>
